package main

import (
	"github.com/thecodingmachine/gotenberg-go-client/v7"
	"log"
)

func main() {
	c := &gotenberg.Client{Hostname: "http://localhost:3000"}
	doc, _ := gotenberg.NewDocumentFromPath("abc.docx", "/Users/lhj/demos/go/example/78.office/abc.docx")
	req := gotenberg.NewOfficeRequest(doc)
	//req.Landscape(true)
	dest := "result.pdf"
	err := c.Store(req, dest)
	if err!= nil {
		log.Fatal(err)
		log.Fatal(err.Error())
	}
}